﻿CREATE TABLE [dbo].[QueuedImage]
(
	[Id] BIGINT NOT NULL IDENTITY(1,1) PRIMARY KEY,
	[ImageId] BIGINT NOT NULL,
	[PriorityId] SMALLINT NOT NULL,
	[StatusId] SMALLINT NOT NULL,
	CONSTRAINT [DF_QueuedImage_Image] FOREIGN KEY ([ImageId]) 
		REFERENCES [dbo].[Image] ([Id]) ON DELETE CASCADE ON UPDATE NO ACTION,
	CONSTRAINT [UQ_QueuedImage_Image] UNIQUE ([ImageId])
)
